﻿<!doctype html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="~{/layout/layout}">
<head>

</head>
<body>

<div id="content" layout:fragment="content">

    <!-- breadcrumb start -->
    <div class="breadcrumb-area">
        <div class="container">
            <ol class="breadcrumb">
                <li><a href="index.html"><i class="fa fa-home"></i> Home</a></li>
                <li class="active">Login</li>
            </ol>
        </div>
    </div>
    <!-- breadcrumb end -->
    <!-- account area start -->
    <div class="account-area pt-30 log">
        <div class="container">
            <div class="row">

                <div class="col-md-12 col-lg-12 col-sm-12">
                    <div class="account-info pb-30">
                        <h3>找回密码</h3>
                        <div class="form-fields" style="border:1px solid #0c192300;">
                            <form action="/user/getPassword" method="post">
                                <p>密码：<span class="required">*</span><input type="password" name="password"
                                                                            placeholder="密码" required/></p>
                                <p>确认密码：<span class="required">*</span><input type="password" name="passwordTwo"
                                                                              placeholder="确认密码" required/></p>
                                <button type="submit" class="btn btn-primary" style="float: right;margin-top: 2em;">确定
                                </button>
                            </form>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    <!-- account area end -->
</div>

<script layout:fragment="script">
    var config = {pageTitle: "首页", navActive: "navProduct"};
    $(function () {
        document.title = config.pageTitle;
        $("#" + config.navActive).addClass("active");
    })
    //邮箱验证
    $("#send").click(function () {
        var email = $("#email").val();
        $("#send").attr("value", "正在发送");
        $("#send").attr("disabled", "true");
        $.ajax({
            url: "getEmail",
            type: "POST",
            timeout: 5000,
            data: email,
            contentType: 'application/json;charset=UTF-8',
            async: false,
            success: function (data) {
                $("#send").attr("value", "验证码已发送");
            },
            error: function () {
                alert("请重新输入！");
            }
        });
    });
</script>
</body>
</html>

